#ifndef __FLATPAKREMOTELS__H__
#define __FLATPAKREMOTELS__H__

#include "FlatpakBase.h"

// flatpak remote-ls --cached  flathub
class Flatpak::RemoteLs : public Flatpak::Base {
    public:
        initCommand(RemoteLs, "remote-ls");
        RemoteLs(const RemoteLs &) = default;
        RemoteLs(RemoteLs &&) = default;
        RemoteLs &operator=(const RemoteLs &) = default;
        RemoteLs &operator=(RemoteLs &&) = default;

        // --user/--system
        UserSystem(RemoteLs)

        // --runtime/--app
        RuntimeApp(RemoteLs)

        // --arch=
        Arch(RemoteLs, aarch64)
        Arch(RemoteLs, arm)
        Arch(RemoteLs, i386)
        Arch(RemoteLs, x86_64)

        // --app-runtime=
        Runtime(RemoteLs)

        // --cached
        Cached(RemoteLs)

        // --columns=
        Columns(RemoteLs, all)
        Columns(RemoteLs, arch)
        Columns(RemoteLs, commit)
        Columns2(RemoteLs, download_size, "download-size")
        Columns2(RemoteLs, installed_size, "installed-size")
        Columns(RemoteLs, options)
        Columns(RemoteLs, ref)
        Columns(RemoteLs, version)
        Columns(RemoteLs, application)
        Columns(RemoteLs, branch)
        Columns(RemoteLs, description)
        Columns(RemoteLs, help)
        Columns(RemoteLs, name)
        Columns(RemoteLs, origin)
        Columns(RemoteLs, runtime)

        // --ostree-verbose
        OstreeVerbose(RemoteLs);

        // [REMOTE or URI]
        RemoteOrUri(RemoteLs)

        QString run() {
            Base::run();
            return FlatpakCommand::RunCommand(command, args);
        }
};


#endif  //!__FLATPAKREMOTELS__H__


/****************************************************************
Usage:
  flatpak remote-ls [OPTION…]  [REMOTE or URI] - Show available runtimes and applications

Help Options:
  -h, --help                Show help options

Application Options:
  --user                    Work on the user installation
  --system                  Work on the system-wide installation (default)
  --installation=NAME       Work on a non-default system-wide installation
  -d, --show-details        Show arches and branches
  --runtime                 Show only runtimes
  --app                     Show only apps
  --updates                 Show only those where updates are available
  --arch=ARCH               Limit to this arch (* for all)
  -a, --all                 List all refs (including locale/debug)
  --app-runtime=RUNTIME     List all applications using RUNTIME
  --columns=FIELD,…         What information to show
  --cached                  Use local caches even if they are stale
  --sideloaded              Only list refs available as sideloads
  -v, --verbose             Show debug information, -vv for more detail
  --ostree-verbose          Show OSTree debug information

Available columns:
  name               Show the name
  description        Show the description
  application        Show the application ID
  version            Show the version
  branch             Show the branch
  arch               Show the architecture
  origin             Show the origin remote
  ref                Show the ref
  commit             Show the active commit
  runtime            Show the runtime
  installed-size     Show the installed size
  download-size      Show the download size
  options            Show options
  all                Show all columns
  help               Show available columns

Append :s[tart], :m[iddle], :e[nd] or :f[ull] to change ellipsization
****************************************************************/